from tkinter import *
root = Tk()
def callback1():
    print("开始")

def callback2():
    print("停止")
    
menubutton = Menubutton(root,text = "下拉菜单",relief = RAISED)
menubutton.pack()
mymenu = Menu(menubutton,tearoff = False)
mymenu.add_checkbutton(label = "开始",command = callback1,selectcolor = "red")
mymenu.add_checkbutton(label = "停止",command = callback2)
mymenu.add_separator()
mymenu.add_checkbutton(label = "退出",command = root.quit)
menubutton.config(menu = mymenu)
mainloop()
